package com.yzy.fly.handler;

import com.yzy.fly.api.function.data.sensitive.handler.FlySensitiveHandler;
import org.apache.commons.lang3.StringUtils;

public class TestSensitiveHandler implements FlySensitiveHandler {

    @Override
    public String getName() {
        return "test";
    }

    @Override
    public String process(String value) {
        if (StringUtils.isBlank(value)) {
            return "";
        }
        final String name = StringUtils.left(value, 1);
        return StringUtils.rightPad(name, StringUtils.length(value), "*");
    }
}
